<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
<div class="wrapper wrapper-content ">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-content">
					<form role="form" action="startleave" method="post" class="form-horizontal m-t" id="signupForm">
						    
						<div class="form-group">
							<label class="col-sm-3 control-label ">请假类型</label> 
							<div class="col-lg-8 col-sm-8 col-xs-8">
								<select name="leaveType" class="form-control">
									<option value="事假">事假</option> 
									<option value="产假">产假</option>
								</select>
							</div>
						</div> 
						<div class="form-group has-feedback">
							<label class="col-sm-3 control-label">开始时间</label>
							 <div class="col-sm-8">
	                            <div class="ibox float-e-margins">
	                               <input id="start" class="form-control" name="startTime" placeholder="开始时间"/><span class="fa fa-calendar txt-danger form-control-feedback"></span>
	                            </div>
                        	</div>  
						</div>
						<div class="form-group has-feedback">
							<label class="col-sm-3 control-label">结束时间</label>
							 <div class="col-sm-8">
	                            <div class="ibox float-e-margins">
	                               <input id="end" class="form-control" name="endTime" placeholder="结束时间"/><span class="fa fa-calendar txt-danger form-control-feedback"></span>
								</div>
                        	</div>  
						</div>
						<div class="form-group has-feedback">
							<label class="col-sm-3 control-label">请假原因</label>
							 <div class="col-sm-8">
	                            <div class="ibox float-e-margins">
	                              <textarea class="form-control" name="reason" rows="3"></textarea>
								</div>
                        	</div>  
						</div>  
						<div class="form-group">
                            <div class="col-sm-8 col-sm-offset-3">
                        		<button id="btn" type="button" class="btn btn-primary">开始申请</button>
								<button type="reset" class="btn btn-primary">重置</button> 
	                        </div>
                        </div> 
					</form>
				 </div>
            </div>
        </div>
    </div>
</div>
<div th:include="include::footer"></div>
</body>
</html>
<script type="text/javascript" src="/js/layui.js"></script>
<script src="//s.xlongwei.com/res/js/My97DatePicker/WdatePicker.js"></script>
 <script type="text/javascript" th:inline="javascript" >
$(document).ready(function(){
	$("#btn").click(function(){
		$.post("startleave",$("form").serialize(),function(){
			alert("申请成功"); 
		});
	});
	
	$('#start').datepicker({setDate: new Date(), dateFormat: 'yyyy-mm-dd'});
	$('#end').datepicker({setDate: new Date(), dateFormat: 'yyyy-mm-dd'});
	
});

</script>
